package com.xin.springcloudconsumer.controller;

import com.xin.springcloudconsumer.config.ProjectUrlConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/ftl")
@Slf4j
public class FtlController {
    @Autowired
    private ProjectUrlConfig projectUrlConfig;

    @RequestMapping("/auth")
    public ModelAndView auth(HttpServletRequest request){
            request.getSession().setAttribute("token","1512737673439560222");
            return new ModelAndView("index/index");
    }
    @GetMapping("/success")
    public ModelAndView success(@RequestParam(name = "result",defaultValue = "")String result){
            return null;
    }

}
